/**
 * 
 */
package formulavendasweb.filter;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import formulavendasweb.util.Constant;

/**
 * @author Fernando
 *
 */
public class AbstractFilter {
	 
    public AbstractFilter() {
        super();
    }
 
    protected void doLogin(ServletRequest request, ServletResponse response, HttpServletRequest req) 
    		throws ServletException, IOException {
        RequestDispatcher rd = req.getRequestDispatcher(Constant.LOGIN_PAGE);
        rd.forward(request, response);
    }
 
    protected void accessDenied(ServletRequest request, ServletResponse response, HttpServletRequest req) 
    		throws ServletException, IOException {
        RequestDispatcher rd = req.getRequestDispatcher(Constant.LOGIN_ERROR_PAGE);
        rd.forward(request, response);
    }
}